﻿@model IEnumerable<RonYee.Models.Book>  

@{
    ViewBag.Title = "图书详细";
}

<div class="layout-sidebar-no group">
   <div id="container">
      <div id="content" role="main">
         
         <div id="breadcrumb">
            <a class="home" href="@Url.Action("Index","Home")">Home</a>  &rsaquo; 
            <a href="@Url.Action("Index","Store")">Store</a> &rsaquo; BookDetails
         </div>
         
         <div class="product type-product status-publish hentry">
            @foreach (var item in Model)
            {
            <div class="images">
                <img width="530" height="345" src="@Url.Content(item.BookImage)" class="attachment-530x345 wp-post-image" alt="@item.BookName" title="@item.BookName" />
                <span class="onsale">Sale!</span>
            </div>
            
            <div class="summary">
               <h4 class="product_title page-title">@item.BookName</h4>
               <p class="price"><del>&#36;@item.OriginalPrice</del> <ins>&#36;@item.CurrentPrice</ins></p>
                   <table>
                      <tbody>
                        <tr>
                           <td>ISBN：</td><td>@item.ISBN</td>
                        </tr>
                        <tr>
                           <td>作者：</td><td>@item.Author</td>
                        </tr>
                        <tr>
                           <td>出版社：</td><td>@item.Publisher</td>
                        </tr>
                        <tr>
                           <td>版本号：</td><td>@item.PublishNum</td>
                        </tr>
                        <tr>
                           <td>库存：</td><td>@item.BookCount</td>
                        </tr>
                      </tbody>
                    </table>
               <form action="#" class="cart" method="post">
                  <a href="@Url.Action("AddToCart", "ShoppingCart", new { id = item.BookId })">
                    <button type="button" class="button-alt">Add to cart</button>
                  </a>
                  <input type="hidden" id="_n" name="_n" value="a93bb4a4c2" /><input type="hidden" name="_wp_http_referer" value="/demo/sommerce/shop/gold-mahibo/" />		
               </form>
            </div>

            }

            <div id="product-tabs">
               <div class="panel" id="tab-attributes">
                  <ul class="tabs">
                    <li class="active"><a href="#related-products">相关书籍</a></li>
                  </ul>
               </div>
               <div class="containers">
                  <div class="panel" id="related-products">
                     <div class="related products">
                        <ul class="products">
                          @foreach (var item in (IEnumerable<RonYee.Models.Book>)ViewData["same"])
                          { 
                           <li class="product border shadow">
                              <a href="@Url.Action("Details", "Store", new { id = item.BookId })">
                                 <div class="thumbnail">
                                    <img width="150" height="150" src="@Url.Content(item.BookImage)" class="attachment-shop_small wp-post-image" alt="@item.BookName" title="@item.BookName" />    			
                                    <div class="thumb-shadow"></div>
                                    <strong class="below-thumb">@item.BookName</strong>
                                 </div>
                                 <span class="price">&#36;@item.CurrentPrice</span>		
                              </a>
                              <div class="buttons">
                                 <a href="@Url.Action("Details", "Store", new { id = item.BookId })" class="details">DETAILS</a>&nbsp;
                                 <a href="@Url.Action("AddToCart", "ShoppingCart", new { id = item.BookId })" class="add-to-cart">ADD TO CART</a>
                              </div>
                           </li>
                          }
                        </ul>
                        <div class="clear"></div>
                     </div>
                  </div>

               </div>
            </div>
         </div>
      </div>
   </div>
</div>
